﻿<%@ Page Title="Recuperar Contrase&ntilde;a" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RecuperarPassword.aspx.cs" Inherits="Services_RecuperarPassword" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="Server">
    
    <%-- Recuperar contraseña --%>
    <div id="SearchUserDiv" class="col_12" visible="true" runat="server">
        <fieldset>
            <legend><strong>Recuperar Contrase&ntilde;a</strong></legend>
            <br />
            <div class="col_12">
                <div class="col_2">&nbsp;</div>
                <div class="col_8">
                    <asp:Label ID="Label4" class="control-label" for="Matricula" runat="server"> Matr&iacute;cula: </asp:Label>
                    <div class="controls">
                        <span class="form-inline">
                            <asp:TextBox CssClass="span2" MaxLength="9" ID="MatriculaTextBox" ValidationGroup="RecuperarPasswordValidation"
                                Style="text-transform: uppercase" runat="server"></asp:TextBox>

                            <%-- Botón para realizar búsqueda por matrícula --%>
                            <asp:Button CssClass="btn btn-small btn-primary" ID="RecuperarPasswordButton" runat="server"
                                Text="Recuperar" ValidationGroup="RecuperarPasswordValidation" OnClick="RecuperarPassword" />
                        </span>
                        <asp:RegularExpressionValidator ID="RegExpMatricula" ControlToValidate="MatriculaTextBox"
                            Display="Dynamic" EnableClientScript="True" ValidationExpression="^[A|a][0-9]{8}$"
                            Text="<img src='/website/Images/cross.png' alt='cross'>" ErrorMessage="Matr&iacute;cula incorrecta."
                            runat="server" ValidationGroup="RecuperarPasswordValidation"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredMatricula" ControlToValidate="MatriculaTextBox"
                            ValidationGroup="RecuperarPasswordValidation" Text="<img src='/website/Images/cross.png' alt='cross'>"
                            Display="Dynamic" runat="server" EnableClientScript="True" 
                            ErrorMessage="Debes ingresar una matr&iacute;cula v&aacute;lida para realizar el correo de recuperaci&oacute;n de la contrase&ntilde;a."></asp:RequiredFieldValidator>
                    </div>
                    <br/>
                    <br/>
                    <asp:ValidationSummary ID="MatriculaValidationSummary" CssClass="alert alert-error"
                        DisplayMode="BulletList" EnableClientScript="True" runat="server" ValidationGroup="RecuperarPasswordValidation"
                        HeaderText="<strong>Revisa los siguientes errores e intenta de nuevo:</strong>" />
                </div>
                <%-- END COL8 --%>
                <div class="col_2">
                    &nbsp;</div>
            </div>
            <%-- END COL12 --%>
        </fieldset>
    </div>
    <script type="text/javascript">
        // Arregla el error de padding del Label ValidationSummary
        $('#ctl00_MainContent_MatriculaValidationSummary').css('padding-right', '14px');
    </script>
</asp:Content>
